import 'package:fish_redux/fish_redux.dart';

import 'action.dart';
import 'state.dart';

Reducer<sn_supportState> buildReducer() {
  return asReducer(
    <Object, Reducer<sn_supportState>>{
      sn_supportAction.action: _onAction,
      sn_supportAction.focusAction:_focusAction,
    },
  );
}

sn_supportState _onAction(sn_supportState state, Action action) {
  final sn_supportState newState = state.clone();
  return newState;
}

sn_supportState _focusAction(sn_supportState state, Action action) {
  final sn_supportState newState = state.clone();

  newState.focusIndex = action.payload;

  return newState;
}
